package sel.me.spring.boot159.web.aop;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import sel.me.spring.boot159.web.dao.PersonMapper;
import sel.me.spring.boot159.web.entity.PersonDO;

/**
 * @author shenenlu 2021年01月14日 上午11:33:29
 */
@Component
public class AopComponent {

    @Autowired
    private PersonMapper personMapper;

    public String test(String aaa){
        PersonDO person = new PersonDO();
//        person.setAge(10);
//        person.setName("andy");
        personMapper.insertSelective(person);
        return aaa;
    }


    @OperationLog(message = "message", operation = "operation")
    public String testAnnotation(String aaa){
        System.out.println("AopComponent.testAnnotation: "+ aaa);
        return aaa;
    }

}
